<?php
/*由bean脚本生成 powerBy--joe*/
namespace app\common\validate;

use app\common\bean\GiveBean;

class GiveValidate extends BaseValidate
{

	static $all = 'all';
	static $add = 'add';
	static $edit = 'edit';
	static $pkId = 'id';

	public function __construct(array $rules = [], array $message = [], array $field = [])
	{
		parent::__construct($rules, $message, $field);
		$this->rule = [
			 GiveBean::$id => 'require', //
			 GiveBean::$rechargePrice => 'require', //充值金额
			 GiveBean::$givePrice => 'require', //赠送金额
			 GiveBean::$updatedAt => 'require', //
			 GiveBean::$createdAt => 'require', //
		];
		$this->message = [
			GiveBean::$id.POINST."require " => 'id必须', //
			GiveBean::$rechargePrice.POINST."require " => 'recharge_price必须', //充值金额
			GiveBean::$givePrice.POINST."require " => 'give_price必须', //赠送金额
			GiveBean::$updatedAt.POINST."require " => 'updated_at必须', //
			GiveBean::$createdAt.POINST."require " => 'created_at必须', //
		];
		$this->scene = [
			self::$all => [
				GiveBean::$id,
				GiveBean::$rechargePrice,
				GiveBean::$givePrice,
				GiveBean::$updatedAt,
				GiveBean::$createdAt,
			],
			self::$add => [
			],
			self::$edit => [
			],
			self::$pkId => [],

		];
	}


}
